library(rgbif)
library(ggplot2)
library(rnaturalearth)
library(sf)
datos <- occ_search(scientificName = "Lynx pardinus", limit = 100)
#head(datos$data[, c("species", "decimalLatitude", "decimalLongitude")])
df <- datos$data
# Basic map
world <- ne_countries(scale = "medium", returnclass = "sf")
# Plot
ggplot() +
geom_sf(data = world, fill = "black", color = "grey30") +
geom_point(data = df, aes(x = decimalLongitude, y = decimalLatitude),
color = "darkred", size = 2, alpha = 0.7) +
coord_sf() +
theme_minimal()